﻿using System;
using System.Collections.Generic;
using System.ServiceModel;
using WcfService1.DTO;

namespace WcfService1
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IInventoryService" in both code and config file together.
    [ServiceContract]
    public interface IInventoryService
    {
        [OperationContract]
        void DoWork();

        [OperationContract]
        List<InventoryDTO> GetInventories(int page, out int recordCount, string sortProperty = null,
                                          string sortType = "ASC");

        [OperationContract]
        void SaveInventory(InventoryDTO inventoryDto);

        [OperationContract]
        void DeleteInventory(InventoryDTO inventoryDto);


        [OperationContract]
        List<InventoryDTO> GetInventoryByCriteria(Dictionary<String, Object> Criteria, string expression, int page,
                                                  out int recordCount);

        [OperationContract]
        InventoryDTO GetInventory(String kodeInventory);

        [OperationContract]
        List<InventoryDTO> GetInventoryBySerial(String kodeInventory);

        [OperationContract]
        List<InventoryWarehouseDTO> GetInventoryWarehouseList(string serialNumber);

        [OperationContract]
        bool SaveInventoryWarehouse(List<InventoryWarehouseDTO> inventoryWarehouses);

        [OperationContract]
        InventoryWarehouseDTO GetQtyOnHand(string serialNumber, string kodeWarehouse);

        [OperationContract]
        List<WarehouseDTO> GetWarehouses(string serialNumber);

        [OperationContract]
        List<InventoryDTO> GetInventoryByCriteriaFull(Dictionary<String, Object> criteria, string expression, int page,
                                                      out int recordCount);

        [OperationContract]
        void ImportInventory(List<InventoryDTO> inventoryDtos);

        [OperationContract]
        List<InventoryDTO> GetInventoryList(List<InventoryDTO> inventoryDtos);

        [OperationContract]
        void AdjustStok();

        [OperationContract]
        InventoryDTO GetInventoryByWarehouse(String kodeInventory, string KodeWarehouse);

        [OperationContract]
        List<InventoryDTO> GetInventoryListbyWarehouse(List<InventoryDTO> inventoryDtos, string kodeWarehouse);

        [OperationContract]
        void AdjustHpp();

        [OperationContract]
        void UpdateHpp(List<InventoryDTO> inventoryDtos);
    }
}